import request from '@/utils/request'

// 查询领料信息列表
export function listPick(query) {
  return request({
    url: '/mes/pick/pickInfoList',
    method: 'get',
    params: query
  })
}

// 查询领料信息详细
export function getPick(id) {
  return request({
    url: '/mes/pick/' + id,
    method: 'get'
  })
}

// 新增领料信息
export function addPick(data) {
  return request({
    url: '/mes/pick',
    method: 'post',
    data: data
  })
}

// 修改领料信息
export function updatePick(data) {
  return request({
    url: '/mes/pick',
    method: 'put',
    data: data
  })
}

// 删除领料信息
export function delPick(id) {
  return request({
    url: '/mes/pick/' + id,
    method: 'delete'
  })
}

//查询领料详情信息
export function getDetails(query) {
  return request({
    url: '/mes/pick/getDetails',
    method: 'get',
    params:query
  })
}

//原料出库
export function outBound(query) {
  return request({
    url: '/mes/pick/outBound',
    method: 'post',
    params:query
  })
}

//派遣小车
export function dispatchAvg(query) {
  return request({
    url: '/mes/pick/dispatchAvg',
    method: 'post',
    params:query
  })
}
